\(\int \frac {x^3}{2-3 x+x^2} \, dx\) [2263]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 27 \[ \int \frac {x^3}{2-3 x+x^2} \, dx=3 x+\frac {x^2}{2}-\log (1-x)+8 \log (2-x) \]

[Out]

3*x+1/2*x^2-ln(1-x)+8*ln(2-x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {715, 646, 31} \[ \int \frac {x^3}{2-3 x+x^2} \, dx=\frac {x^2}{2}+3 x-\log (1-x)+8 \log (2-x) \]

[In]

Int[x^3/(2 - 3*x + x^2),x]

[Out]

3*x + x^2/2 - Log[1 - x] + 8*Log[2 - x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 646

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[
(c*d - e*(b/2 - q/2))/q, Int[1/(b/2 - q/2 + c*x), x], x] - Dist[(c*d - e*(b/2 + q/2))/q, Int[1/(b/2 + q/2 + c*
x), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && NiceSqrtQ[b^2 - 4*a*
c]

Rule 715

Int[((d_.) + (e_.)*(x_))^(m_)/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)
^m, a + b*x + c*x^2, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2,
0] && NeQ[2*c*d - b*e, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rubi steps \begin{align*} \text {integral}& = \int \left (3+x-\frac {6-7 x}{2-3 x+x^2}\right ) \, dx \\ & = 3 x+\frac {x^2}{2}-\int \frac {6-7 x}{2-3 x+x^2} \, dx \\ & = 3 x+\frac {x^2}{2}+8 \int \frac {1}{-2+x} \, dx-\int \frac {1}{-1+x} \, dx \\ & = 3 x+\frac {x^2}{2}-\log (1-x)+8 \log (2-x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {x^3}{2-3 x+x^2} \, dx=3 x+\frac {x^2}{2}-\log (1-x)+8 \log (2-x) \]

[In]

Integrate[x^3/(2 - 3*x + x^2),x]

[Out]

3*x + x^2/2 - Log[1 - x] + 8*Log[2 - x]

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.81

method result size
default \(3 x +\frac {x^{2}}{2}-\ln \left (-1+x \right )+8 \ln \left (-2+x \right )\) \(22\)
norman \(3 x +\frac {x^{2}}{2}-\ln \left (-1+x \right )+8 \ln \left (-2+x \right )\) \(22\)
risch \(3 x +\frac {x^{2}}{2}-\ln \left (-1+x \right )+8 \ln \left (-2+x \right )\) \(22\)
parallelrisch \(3 x +\frac {x^{2}}{2}-\ln \left (-1+x \right )+8 \ln \left (-2+x \right )\) \(22\)

[In]

int(x^3/(x^2-3*x+2),x,method=_RETURNVERBOSE)

[Out]

3*x+1/2*x^2-ln(-1+x)+8*ln(-2+x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.78 \[ \int \frac {x^3}{2-3 x+x^2} \, dx=\frac {1}{2} \, x^{2} + 3 \, x - \log \left (x - 1\right ) + 8 \, \log \left (x - 2\right ) \]

[In]

integrate(x^3/(x^2-3*x+2),x, algorithm="fricas")

[Out]

1/2*x^2 + 3*x - log(x - 1) + 8*log(x - 2)

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.70 \[ \int \frac {x^3}{2-3 x+x^2} \, dx=\frac {x^{2}}{2} + 3 x + 8 \log {\left (x - 2 \right )} - \log {\left (x - 1 \right )} \]

[In]

integrate(x**3/(x**2-3*x+2),x)

[Out]

x**2/2 + 3*x + 8*log(x - 2) - log(x - 1)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.78 \[ \int \frac {x^3}{2-3 x+x^2} \, dx=\frac {1}{2} \, x^{2} + 3 \, x - \log \left (x - 1\right ) + 8 \, \log \left (x - 2\right ) \]

[In]

integrate(x^3/(x^2-3*x+2),x, algorithm="maxima")

[Out]

1/2*x^2 + 3*x - log(x - 1) + 8*log(x - 2)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85 \[ \int \frac {x^3}{2-3 x+x^2} \, dx=\frac {1}{2} \, x^{2} + 3 \, x - \log \left ({\left | x - 1 \right |}\right ) + 8 \, \log \left ({\left | x - 2 \right |}\right ) \]

[In]

integrate(x^3/(x^2-3*x+2),x, algorithm="giac")

[Out]

1/2*x^2 + 3*x - log(abs(x - 1)) + 8*log(abs(x - 2))

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.78 \[ \int \frac {x^3}{2-3 x+x^2} \, dx=3\,x-\ln \left (x-1\right )+8\,\ln \left (x-2\right )+\frac {x^2}{2} \]

[In]

int(x^3/(x^2 - 3*x + 2),x)

[Out]

3*x - log(x - 1) + 8*log(x - 2) + x^2/2